package com.cvtt.sip;


public interface CallAgentListener {

	/**
	 * Callback function called when arriving a new INVITE method (incoming call)
	 */
	public void onCallIncoming(String number);

	/**
	 * Callback function called when arriving a new Re-INVITE method (re-inviting/call modify)
	 */
	public void onCallModifying();

	/** Callback function called when arriving a 180 Ringing */
	public void onCallRinging();

	/** Callback function called when arriving a 2xx (call accepted) */
	public boolean onCallAccepted();

	/** Callback function called when arriving a 4xx (call failure) */
	public void onCallRefused(int releaseReason);

	/** Callback function called when arriving an ACK method (call confirmed) */
	public void onCallConfirmed();

	/** Callback function called when the invite expires */
	public void onCallTimeout();

	/** Callback function called when arriving a 3xx (call redirection) */
	// public void onCallReInviteRedirection(Call call, String reason, Vector
	// contact_list, Message resp);
	/** Callback function called when arriving a CANCEL request */
	public void onCallCanceling();

	/** Callback function called when arriving a BYE request */
	public void onCallClosing();

	/**
	 * Callback function called when arriving a response for the BYE request (call closed)
	 */
	public void onCallClosed();
	
	//Added by huah in 2012-09-01
	public void onCallEnd();

	public void onStatusChanged(int state, String caller);
}
